Call in ST-code is suddenly fault, after 'Undo' has been called

Symptom: The formal →call of a →block within the ST-object is highlighted as error after a change has been undone. Either one of the →input variables or one of the →output variables is highlighted as faulty.
These messages are displayed:

  • Could not resolve reference to "name".

  • Cannot resolve type of language element.

Cause: The block is a FBD function block or a FBD function for which the name of an input variable or output variable has been changed in the FBD-editor. All usages of this variable in the ST-object have automatically been renamed to the new name. Due to the command Undo, this automatic renaming has been undone as the most recent edit action in the ST-editor. The action has only been undone in the current ST-object and did not affect other objects (e.g. the FBD function block or the FBD function).

Solution:

  • In order to correct the code in the ST-object only: Redo the undone edit action in the ST-editor: menu Edit, command Redo

  • In order to undo the name change of the input or output variable for the block as well: Change to the FBD-editor for the FBD function block or the FBD function and change the name to the original name. All usages of the input or output variable in the ST-objects and/or FBD-objects of the current project are automatically renamed to the original name.